﻿using InnoWeb.CEND.Core.Model.News;
using InnoWeb.CEND.Data.Mapping.BaseMapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InnoWeb.CEND.Data.Mapping.News
{
    public class NewsContentMapping : BaseMappingConfiguration<NewsContent, int>
    {
        public NewsContentMapping()
        {
            this.Property(a => a.VideoUrl).IsOptional();

            this.Property(a => a.NewsItemId);
            this.HasRequired(a => a.NewsItem).WithMany(a => a.NewsContents).HasForeignKey(a => a.NewsItemId);
        }
    }
}
